<form method="post" autocomplete="off">
	<div class="card">
		<div class="card-header">创建充值卡</div>
		<div class="card-body">
			<div class="form-group">
				<label class="font-weight-bold">卡号规则</label>
				<input type="text" class="form-control" name="card_id">
				<small class="form-text text-muted">"@"代表任意随机英文字符，"#"代表任意随机数字，"*"代表任意英文或数字</small>
				<small class="form-text text-muted">规则样本：<strong class="text-success">@@@@@#####*****</strong></small>
				<small class="form-text text-muted">注意：规则位数过小会造成充值卡生成重复概率增大，过多的重复充值卡会造成充值卡生成终止</small>
				<small class="form-text text-muted">充值卡规则中不能带有中文及其他特殊符号</small>
				<small class="form-text text-muted">为了避免充值卡重复，随机位数最好不要少于8位</small>
			</div>
			<div class="form-group">
				<label class="font-weight-bold">生成数量</label>
				<input type="text" class="form-control" name="numbers" value="10">
				<small class="form-text text-muted">每次生成数据建议在100以内</small>
			</div>
			<div class="form-group">
				<label class="font-weight-bold">类型</label>
				<div class="custom-control custom-radio" data-after="meal_type">
					<input name="type" type="radio" class="custom-control-input" value="0" checked>
					<label class="custom-control-label">体验卡/一天 (10次)</label>
				</div>
				<div class="custom-control custom-radio" data-after="meal_type">
					<input name="type" type="radio" class="custom-control-input" value="1">
					<label class="custom-control-label">周卡/7天 （无限次）</label>
				</div>
				<div class="custom-control custom-radio" data-after="meal_type">
					<input name="type" type="radio" class="custom-control-input" value="2">
					<label class="custom-control-label">月卡/30天（无限次）</label>
				</div>
				<div class="custom-control custom-radio" data-after="meal_type">
					<input name="type" type="radio" class="custom-control-input" value="3">
					<label class="custom-control-label">年卡/365天 （无限次）</label>
				</div>
				<div class="custom-control custom-radio" data-after="meal_type">
					<input name="type" type="radio" class="custom-control-input" value="-1">
					<label class="custom-control-label">终身（无限次）</label>
				</div>
			</div>
			<div class="type-custom type-vip d-none">
				
			</div>
			<div class="type-custom type-download {if empty($meal['type']) || $meal['type'] != 'download'}d-none{/if}">
				<div class="mx-3 bg-light">
				</div>
			</div>
		</div>
		<div class="card-footer">
			<button class="btn btn-success ajax-post" type="submit">生成充值卡</button>
		</div>
	</div>
</form>
<script type="text/javascript">
	function meal_type(input,data){
		$('.type-custom').addClass('d-none');
		$('.type-'+input.val()).removeClass('d-none')
	}
</script>
